import { createSlice } from "@reduxjs/toolkit"
// import {getCookie, get__token} from '@Utils/getPageDecrypt'
export interface jinritemaiCopyGoodsState {
    copynum: number // 裂变数量
    goodTitleCf: number // 商品标题
    goodMiniTitle: boolean // 导购标题
    goodMiniTitleCf: number // 导购标题单选项
    goodImageCf: number // 主图但选项
    goodImage34: boolean // 主图3：4
    goodImage34Cf: number // 主图3：4 单选项
    goodminivideo: boolean // 主图视频
    goodWhitehImage: boolean // 白底图
    goodWhitehImageCf: number // 白底图 单选项
    // goodDetelesImage: boolean // 商品详情
    goodDetelesImageCf: number // 商品详情 单选项
    goodSpcter: boolean // 商品规格
    goodSpcterCf: number // 商品规格 单选项
    goodPriceAndStock: boolean // 价格与库存
    goodPriceAndStockCf: number // 价格与库存 单选项
}
export interface goodsDetellStatsu {
    copynum: number // 裂变数量
    // goodTitleCf: number // 商品标题
}
export interface jinritemaiCopyGoods {
    aiTitle: object,
    jiebaTitle: any[],
    zhutuImageList: object,
    zhutuAddImageList: object,
    detailsAddImageList: object,
    skuTitleList: object,
    ladderPriceList: object,
    fixedPriceList: object,
    copyGoodConfig: jinritemaiCopyGoodsState,
    goodsDetell: goodsDetellStatsu,
    priceGroup: number,
    addHuohaoContent: object,
    neircunStatus: boolean,
    zhutuAddImageList34: object,
    refoterZhutuStatusState: boolean
    // msToken: string,
    // __token: string,
    // userInfo: object
}

// 列表获取 后期异步获取数据 修改缓存
const jinritemaiCopyGoods: any = createSlice({
    name: "jinritemaiCopyGoods",
    initialState: {
        aiTitle: [],
        jiebaTitle: [],
        zhutuImageList: [
            'zutuboderImage/7-12/2.png',
            'zutuboderImage/7-12/1.png',

            'zutuboderImage/4-11/2.png',
            'zutuboderImage/4-11/21.png',
            'zutuboderImage/4-11/23.png',
            'zutuboderImage/4-11/234.png',
            'zutuboderImage/4-11/3.png',
            'zutuboderImage/4-11/32.png',
            'zutuboderImage/4-11/323.png',
            'zutuboderImage/4-11/34534.png',
            'zutuboderImage/4-11/4452345.png',
            'zutuboderImage/4-11/54234.png',
            'zutuboderImage/4-11/包图_01a99d0ee1a206035ab775251cb45318_56222.png',
            'zutuboderImage/4-11/包图_05c1222fee25e78b52e4add3ddefafaf_73379.png',
            'zutuboderImage/4-11/包图_085b57eda1cf4790eeadaeac2a1b6e80_74753.png',
            'zutuboderImage/4-11/包图_08b50e37ba6d7393a23db8c7b02db782_55339.png',
            'zutuboderImage/4-11/包图_1079694c271de1f5e42c4b3bb6e30abd_74459.png',
            'zutuboderImage/4-11/包图_1307cf8b7e36604f652417b468ec53a2_49165.png',
            'zutuboderImage/4-11/包图_18700171ea11f781a5d43a97246e0129_67331.png',
            'zutuboderImage/4-11/包图_187e9a09064b2665feb45d7a53aaffde_46696.png',
            'zutuboderImage/4-11/包图_19a495b0c2e666a0658d6e50c32643b0_91993.png',
            'zutuboderImage/4-11/包图_1eddc424c9e68ff0f0ac625c5a133f4c_88369.png',
            'zutuboderImage/4-11/包图_20b18236c2eec0c076e7bd77237efcab_84734.png',
            'zutuboderImage/4-11/包图_22b272e913261d99b5993f2d1d3e6794_40888.png',
            'zutuboderImage/4-11/包图_27c33a40e168c492a08ff086f3667cd8_19576.png',
            'zutuboderImage/4-11/包图_2f83a0f045fcecafa4b51c76b9ca10cb_94376.png',
            'zutuboderImage/4-11/包图_3a62dca1a8f7ad8a2c9c5a129fc448e4_19564.png',
            'zutuboderImage/4-11/包图_3d798ce8ab981933759b22c32836bfac_88599.png',
            'zutuboderImage/4-11/包图_47ba8ba4dec54b3cbe1378ed4268edaa_24387.png',
            'zutuboderImage/4-11/包图_4841d805ad04a7d4bc12a21ec16381d5_40595.png',
            'zutuboderImage/4-11/包图_487b2e0438e46f802c8c0f01311912d9_13670.png',
            'zutuboderImage/4-11/包图_582196430c68520ec16adf59fda5c0ea_47542.png',
            'zutuboderImage/4-11/包图_584208e98c2bb7d6afa53f689b441c0b_68814.png',
            'zutuboderImage/4-11/包图_5b5c0c86646bb7017b1a5ec430459fcc_12056.png',
            'zutuboderImage/4-11/包图_605a2b755d00a35c28695150e4807225_94219.png',
            'zutuboderImage/4-11/包图_63943ca29677943153d1cd793ac59144_72988.png',
            'zutuboderImage/4-11/包图_65ab366841cdbeb490e1a97c387d2630_22934.png',
            'zutuboderImage/4-11/包图_7539825af0d72e40c073c4103086b80c_42630.png',
            'zutuboderImage/4-11/包图_8c450c6514d735af32ccfa292d8faa9b_11904.png',
            'zutuboderImage/4-11/包图_8d5c4eb390ce3a374781d5f262385dfb_56161.png',
            'zutuboderImage/4-11/包图_929273921d221d24801a70039549f1cc_71676.png',
            'zutuboderImage/4-11/包图_983ef06effe14aa7c9ab59faa51ac4ba_52103.png',
            'zutuboderImage/4-11/包图_9eb6819e77baf581e2f8badf5013cd7e_23104.png',
            'zutuboderImage/4-11/包图_9fba80c11362b745b5895316945f2fc4_82202.png',
            'zutuboderImage/4-11/包图_a57e002b1c6e68e5f8b8065e313e6c43_89139.png',
            'zutuboderImage/4-11/包图_a97e7f8422e1457ee321c1ac0990ff0c_65311.png',
            'zutuboderImage/4-11/包图_b484889f9ecb444ae347f89df32c367f_75860.png',
            'zutuboderImage/4-11/包图_b8a4664391984dc208addadd53593e26_93772.png',
            'zutuboderImage/4-11/包图_c6e560dab7b001af936e63e4aa9435b6_81804.png',
            'zutuboderImage/4-11/包图_c815ddf0e238866e5f5b35e31bee52ac_53925.png',
            'zutuboderImage/4-11/包图_c89302e5f96f36bc7dc66ebc5eb86474_83083.png',
            'zutuboderImage/4-11/包图_cc3c503e562e34de082f3a94bff94b81_56487.png',
            'zutuboderImage/4-11/包图_ce38f6b7cfc1bb93cb04d13c257fa773_86063.png',
            'zutuboderImage/4-11/包图_d4deb3f4aaf12a4620381faf9b1ef4d7_66987.png',
            'zutuboderImage/4-11/包图_d9702caa92cc193d488e0c8b0be9280e_35892.png',
            'zutuboderImage/4-11/包图_ded036e23bec04b3b423d2f74e06905a_17214.png',
            'zutuboderImage/4-11/包图_dfee5ecbb7252f1077878c855441aede_72289.png',
            'zutuboderImage/4-11/包图_ec29bf8eaa3982d6bcbece76370fc54d_52741.png',
            'zutuboderImage/4-11/包图_ed055c7ed960de523b2451ded2044601_90174.png',
            'zutuboderImage/4-11/包图_f2e42520796aeea03579f031551ebe26_60653.png',
            'zutuboderImage/4-11/包图_f3190be8e0ad81ad16defa14b5806866_76563.png',
            'zutuboderImage/4-11/无理由退.png',
            'zutuboderImage/4-11/未标题-1.png',
            'zutuboderImage/4-11/爆款.png',
            'zutuboderImage/4-11/红1.png',
            'zutuboderImage/4-11/蓝.png',
            'zutuboderImage/4-11/黄.png',

            'zutuboderImage/4-11/纯色/包图_02e9247662d7e057e1383e2febdc1bfd_92072.png',
            'zutuboderImage/4-11/纯色/包图_181300d9cfb871c97e8e37c0366e4db4_90312.png',
            'zutuboderImage/4-11/纯色/包图_1b6583cee2ea223e0ece43043756a750_84947.png',
            'zutuboderImage/4-11/纯色/包图_1f2ab9b2c4514d8f550c00b0410155ab_58068.png',
            'zutuboderImage/4-11/纯色/包图_2c7b0daca1ec1e609b34ea6de7781076_52528.png',
            'zutuboderImage/4-11/纯色/包图_34a3e2b8678c62831e482c70b0ca95e6_55903.png',
            'zutuboderImage/4-11/纯色/包图_358d79040a08fd52017db51a7fbc61fc_49645.png',
            'zutuboderImage/4-11/纯色/包图_389af442ccb68396bbb45797950c90e7_14367.png',
            'zutuboderImage/4-11/纯色/包图_3a0df8f33f7ffeb0e9fbd02c7992af9e_10655.png',
            'zutuboderImage/4-11/纯色/包图_3aad0fa2cfc56175ce306f30ae1c74d1_67491.png',
            'zutuboderImage/4-11/纯色/包图_3c18764ce6e42b587fadfb636e01cc28_90442.png',
            'zutuboderImage/4-11/纯色/包图_3ce5d50861f5492887da8b14627ea28b_76249.png',
            'zutuboderImage/4-11/纯色/包图_3f4eab7b46610366c5678c9d71f44a35_76703.png',
            'zutuboderImage/4-11/纯色/包图_4fe069416101cc1b2d02346d77519acf_56088.png',
            'zutuboderImage/4-11/纯色/包图_505b89db6082e2148518e335350f12e9_53171.png',
            'zutuboderImage/4-11/纯色/包图_5654edb361c437b5a6e0d716c3fa7287_17886.png',
            'zutuboderImage/4-11/纯色/包图_5ca2dc40b6e7b02867574cb70a083cc8_28179.png',
            'zutuboderImage/4-11/纯色/包图_61523f287c8d2225073f20041c5d4bd0_77093.png',
            'zutuboderImage/4-11/纯色/包图_63464a4fc27739fdfc3ca0706a58e2d5_76013.png',
            'zutuboderImage/4-11/纯色/包图_658772b1e0f39e5b563d54e9bd75512c_66377.png',
            'zutuboderImage/4-11/纯色/包图_711709c39af6a47062b4842e64080076_40654.png',
            'zutuboderImage/4-11/纯色/包图_7b5cf7c57baed99cb9a8915c6c4db1dd_72614.png',
            'zutuboderImage/4-11/纯色/包图_84d416cd61820552b1da534ecf9d3a30_23838.png',
            'zutuboderImage/4-11/纯色/包图_87723e5d517177ae17ac5e4d14394fb0_26922.png',
            'zutuboderImage/4-11/纯色/包图_906ff76b4fc6ada664472dd3daecab6e_11338.png',
            'zutuboderImage/4-11/纯色/包图_92f0530b6a388d830ad5dfb25f3ef8b6_26032.png',
            'zutuboderImage/4-11/纯色/包图_939750fb1edfe66ac69f3e79f3e02b80_56505.png',
            'zutuboderImage/4-11/纯色/包图_97f10aff3ab2d4d5cf70872051b0f3c5_60856.png',
            'zutuboderImage/4-11/纯色/包图_a118f7d0245c7341302636f1efb2b401_82653.png',
            'zutuboderImage/4-11/纯色/包图_a2a96c221519b71fcb49679fdd8c3cd5_85990.png',
            'zutuboderImage/4-11/纯色/包图_aac9fed0a282d99e0023d99652d3414d_94644.png',
            'zutuboderImage/4-11/纯色/包图_b48e3c405432abfa538dc7598099910b_87568.png',
            'zutuboderImage/4-11/纯色/包图_c2956fad0c9e4a11bc8d42ab5a7ba13d_28251.png',
            'zutuboderImage/4-11/纯色/包图_c4278eec83c8a92f060f6ce1a6c3de35_73376.png',
            'zutuboderImage/4-11/纯色/包图_c62dba7cde7c43c341dd6d1477be3e10_86940.png',
            'zutuboderImage/4-11/纯色/包图_c98ec6708cd710f437c6802a7b9b748c_53308.png',
            'zutuboderImage/4-11/纯色/包图_cb17bd9240579258cb515afa33af57cc_32767.png',
            'zutuboderImage/4-11/纯色/包图_d0b7204696875f7bd8fffae9bb30148f_51528.png',
            'zutuboderImage/4-11/纯色/包图_d0eb44a6e274e8277edfc563a2625a98_75735.png',
            'zutuboderImage/4-11/纯色/包图_d44675249179ac42cffcb04a8fc796eb_18266.png',
            'zutuboderImage/4-11/纯色/包图_d4d5f68abf0d0f7c6274b85ec645c662_81069.png',
            'zutuboderImage/4-11/纯色/包图_d70cd11359ce8ade2257dcfe817f0217_64584.png',
            'zutuboderImage/4-11/纯色/包图_ddff70335b7e05f9b269d5f1e2b00fba_82050.png',
            'zutuboderImage/4-11/纯色/包图_e0053fd20a551ec21cfe4c93105dfe69_59052.png',
            'zutuboderImage/4-11/纯色/包图_e0f47d5910550fa573cb15f9aea141f9_72429.png',
            'zutuboderImage/4-11/纯色/包图_e5078a739f50ee480354e48284d15aa6_55066.png',
            'zutuboderImage/4-11/纯色/包图_fbfe69aa82dbddcd780416c1697ebdf5_95228.png',
            'zutuboderImage/4-11/纯色/红1.png',
            'zutuboderImage/4-11/纯色/蓝.png',
            'zutuboderImage/4-11/纯色/黄.png',

        ],
        zhutuAddImageList: [],
        zhutuAddImageList34: [],
        detailsAddImageList: [],
        skuTitleList: [],
        ladderPriceList: [],
        fixedPriceList: [],
        copyGoodConfig: {},
        goodsDetell: {},
        priceGroup: 1,
        addHuohaoContent: {},
        neircunStatus: true,
        refoterZhutuStatusState: false,
        aiCretedList: []
        // msToken: '',
        // __token: '',
        // userInfo: {}
    },
    reducers: {
        setAiTitle: (state, action) => {
            state.aiTitle = action.payload
        },
        setJiebaTitle: (state, action) => {
            state.jiebaTitle = action.payload
        },
        setZhutuAddImageList: (state, action) => {
            state.zhutuAddImageList = action.payload
        },
        setZhutuAddImageList34: (state, action) => {
            state.zhutuAddImageList34 = action.payload
        },
        setDetailsAddImageList: (state, action) => {
            state.detailsAddImageList = action.payload
        },
        setSkuTitleList: (state, action) => {
            state.skuTitleList = action.payload
        },
        setLadderPriceList: (state, action) => {
            state.ladderPriceList = action.payload
        },
        setFixedPriceList: (state, action) => {
            state.fixedPriceList = action.payload
        },
        setCopyGoodConfigAction: (state, action) => {
            state.copyGoodConfig = action.payload
        },
        setGoodsDetell: (state, action) => {
            state.goodsDetell = action.payload
        },
        setPriceGroupAction: (state, action) => {
            state.priceGroup = action.payload
        },
        setDddHuohaoContent(state, action) {
            state.addHuohaoContent = action.payload
        },
        setneircunStatus(state, action) {
            state.neircunStatus = action.payload
        },
        setRefoterZhutuStatusState(state, action) {
            state.refoterZhutuStatusState = action.payload
        },
        setAiCretedList(state, action) {
            console.log('要保持的数据', action)
            state.aiCretedList = action.payload
        }

    }
})

export const {
    setAiTitle,
    setJiebaTitle,
    setZhutuAddImageList,
    setZhutuAddImageList34,
    setDetailsAddImageList,
    setSkuTitleList,
    setLadderPriceList,
    setFixedPriceList,
    setCopyGoodConfigAction,
    setGoodsDetell,
    setPriceGroupAction,
    setDddHuohaoContent,
    setneircunStatus,
    setRefoterZhutuStatusState,
    setAiCretedList
} = jinritemaiCopyGoods.actions

export default jinritemaiCopyGoods.reducer